package com.wft.面试题;

public class 递归1 {
    public static void main(String[] args) {
        fun(1237);
        System.out.println(fun2(10,8));
    }

    public static void fun(int i){
        System.out.println(i);
        if(i < 5000){
            fun(2*i);
        }
        System.out.println(i);
    }

    public static int fun2(int age,int times){
        if(times > 1){
            return fun2(age + 2,--times);
        }
        return age;
    }
}
